package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.AccountingIncomeCategoriesMapper;
import com.ruoyi.system.domain.AccountingIncomeCategories;
import com.ruoyi.system.service.IAccountingIncomeCategoriesService;

/**
 * 记账本收入类型，定义收入类别及其属性Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-13
 */
@Service
public class AccountingIncomeCategoriesServiceImpl implements IAccountingIncomeCategoriesService
{
    @Autowired
    private AccountingIncomeCategoriesMapper accountingIncomeCategoriesMapper;

    /**
     * 通过id查询记账本收入类型
     *
     *
     *
     * @param id 记账本收入类型，定义收入类别及其属性主键
     * @return 记账本收入类型，定义收入类别及其属性
     */
    @Override
    public AccountingIncomeCategories selectAccountingIncomeCategoriesById(Long id)
    {
        return accountingIncomeCategoriesMapper.selectAccountingIncomeCategoriesById(id);
    }

    /**
     * 查询记账本收入类型列表
     *
     * @param accountingIncomeCategories 记账本收入类型，定义收入类别及其属性
     * @return 记账本收入类型，定义收入类别及其属性
     */
    @Override
    public List<AccountingIncomeCategories> selectAccountingIncomeCategoriesList(AccountingIncomeCategories accountingIncomeCategories)
    {
        return accountingIncomeCategoriesMapper.selectAccountingIncomeCategoriesList(accountingIncomeCategories);
    }

    /**
     * 新增记账本收入类型
     *
     * @param accountingIncomeCategories 记账本收入类型，定义收入类别及其属性
     * @return 结果
     */
    @Override
    public int insertAccountingIncomeCategories(AccountingIncomeCategories accountingIncomeCategories)
    {
        return accountingIncomeCategoriesMapper.insertAccountingIncomeCategories(accountingIncomeCategories);
    }

    /**
     * 修改记账本收入类型
     *
     * @param accountingIncomeCategories 记账本收入类型，定义收入类别及其属性
     * @return 结果
     */
    @Override
    public int updateAccountingIncomeCategories(AccountingIncomeCategories accountingIncomeCategories)
    {
        return accountingIncomeCategoriesMapper.updateAccountingIncomeCategories(accountingIncomeCategories);
    }

    /**
     * 批量删除记账本收入类型
     *
     * @param ids 需要删除的记账本收入类型，定义收入类别及其属性主键
     * @return 结果
     */
    @Override
    public int deleteAccountingIncomeCategoriesByIds(Long[] ids)
    {
        return accountingIncomeCategoriesMapper.deleteAccountingIncomeCategoriesByIds(ids);
    }

    /**
     * 删除记账本收入类型
     *
     * @param id 记账本收入类型，定义收入类别及其属性主键
     * @return 结果
     */
    @Override
    public int deleteAccountingIncomeCategoriesById(Long id)
    {
        return accountingIncomeCategoriesMapper.deleteAccountingIncomeCategoriesById(id);
    }
}
